package tianrun.ziguan.api.calculate.config.dto.request;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Collections;
import java.util.List;

public class ModulesSaveBody extends ModulesDetailBody {
    @NotNull
    private List<Module> modules;
    @NotNull
    private List<Module> delModules;

    public static ModulesSaveBody empty(Long templateId) {
        ModulesSaveBody saveBody = new ModulesSaveBody();
        saveBody.setSourceId(templateId);
        saveBody.setModules(Collections.emptyList());
        return saveBody;
    }

    public List<Module> getModules() {
        return modules;
    }

    public void setModules(List<Module> modules) {
        this.modules = modules;
    }

    public List<Module> getDelModules() {
        return delModules;
    }

    public void setDelModules(List<Module> delModules) {
        this.delModules = delModules;
    }
}
